package com.kwshare.system.controller;

import com.kwshare.common.core.domain.Response;
import com.kwshare.system.service.impl.RoleMenuServiceImpl;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * 用户角色
 *
 * @author yangjing
 */
@RestController
@RequestMapping("/roleMenu")
public class RoleMenuController {

    @Resource
    private RoleMenuServiceImpl roleMenuService;

    @PutMapping("/{roleId}")
    public Response<?> edit(@PathVariable("roleId") Long roleId, @RequestBody List<Long> ids){
        roleMenuService.updateRoleMenu(roleId, ids);
        return Response.ok();
    }
}
